# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tchunt-ng
pkgver=208.b8cf7fc
pkgrel=2
pkgdesc='Reveal encrypted files stored on a filesystem.'
groups=('blackarch' 'blackarch-forensic' 'blackarch-crypto')
arch=('any')
url='https://github.com/antagon/TCHunt-ng'
license=('GPL3')
depends=()
makedepends=('git')
source=("$pkgname::git+https://github.com/antagon/TCHunt-ng.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd "$pkgname/src"

  sed -i 's|/usr/local/bin|/usr/bin|' Makefile
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 src/tchuntng "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md ChangeLog
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

